<style>
td span.button.bottom_docu {
    background-position: -84px -42px;
}
td span.button {
    line-height: 0;
    margin: 0;
    padding: 0;
    width: 21px;
    height: 21px;
    display: inline-block;
    vertical-align: middle;
    border: 0 none;
    cursor: pointer;
    outline: none;
    background-color: transparent;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-image: url("/vendor/zTree/v3/css/metroStyle/img/metro.png");
}
</style>		
<table class="table table-border table-bordered table-bg table-hover table-sort">
	<thead>
		<tr>
			<th width="25"></th>
			<th>名称</th>
			<th>模块</th>
			<th>操作类</th>
			<th>方法名称</th>
		</tr>
	</thead>
	<tbody>
<{php}>
use \think\Db;
$type = c('type.admin_power_type');
foreach($type as $k => $v):
<{/php}>	

	<tr style="background:#f9f9f9;">
		<td>
		<!-- 
		<input type="checkbox" name="id[]" cat='true' id="label_9<{$k}>" cat_id="<{$k}>" value="">
		 -->
		</td>
		<td>
			<span style="color:red;"><label for="label_9<{$k}>"><{$v}></label></span>
		</td>
		<td></td>
		<td></td>
		<td></td>
	</tr>
	 	<{php}>
	 		$rs = Db::name('admin_power')->where('type', $k)->order("id desc")->select();
	 		foreach($rs as $val):
	 	<{/php}>
		<tr style="background:#f9f9f9;">
			<td><input <{if condition="!in_array($val['id'], $ids)"}>checked=true<{/if}> type="checkbox" name="ids[<{$val['id']}>]" id="label_<{$val['id']}>" cat_id="<{$val['type']}>" value="<{$val['id']}>"></td>
			<td>
				&nbsp;&nbsp;&nbsp;&nbsp;<span class="button bottom_docu"></span>
				<label for="label_<{$val['id']}>"><{$val['title']}></label>
			</td>
			<td><{$val['module']}></td>
			<td><{$val['controller']}></td>
			<td><{$val['actions']}></td>
		</tr>
		<{php}>
			endforeach;
		<{/php}>


<{php}>
endforeach;
<{/php}>
	</tbody>
</table>